
import globalProperties from './globalProperties'
import { createSSRApp } from 'vue'
import {createPinia} from 'pinia'
//引入持久化插件
import { createUnistorage } from 'pinia-plugin-unistorage'
import App from './App.vue'
import uviewPlus from '@/uni_modules/uview-plus'
export function createApp() {
  const app = createSSRApp(App)
  const pinia = createPinia()
  pinia.use(createUnistorage())
  app.use(pinia)
  app.use(globalProperties)
  app.use(uviewPlus)
  app.provide("$pinia",app.config.globalProperties.$pinia)
  app.provide("$utils",app.config.globalProperties.$utils)
  app.provide("$http",app.config.globalProperties.$http)
  return {
    app
  }
}